#include <REGX52.H>
#include <STC89C5xRC.H>
#include <IIC.H>

#include <ADS1115.H>


void main()
{
	unsigned int voltage=0;
	unsigned char arr[8];
	char * P = arr;
	
	uart_init();//2400
	ADS1115_Write();
	Delay_x_ms(1000);
	while(1)
	{
		voltage = (unsigned int)(ADS1115_Read()*1000);
		IntToString(P,voltage);
		UART_Send(P);
		UART_Send("mV");
		Delay_x_ms(1000);
	}
}
